/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.st.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 物料转换单Entity
 * @author HOHD
 * @version 2021-03-10
 */
@Table(name="st_material_convert_bill_detail", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="material_code", attrName="materialCode", label="物料名称"),
		@Column(name="batch_number", attrName="batchNumber", label="批号"),
		@Column(name="bar_code", attrName="barCode", label="条码号"),
		@Column(name="number", attrName="number", label="数量"),
		@Column(name="out_warehouse", attrName="outWarehouse", label="调出仓位"),
		@Column(name="in_warehouse", attrName="inWarehouse", label="调入仓位"),
		@Column(name="convert_material_code", attrName="convertMaterialCode", label="转换后物料名称"),
		@Column(name="converr_bar_code", attrName="converrBarCode", label="转换后条码号"),
		@Column(name="pack_type", attrName="packType", label="包装规格"),
		@Column(name="product_date", attrName="productDate", label="生产日期"),
		@Column(name="saved_type", attrName="savedType", label="保质期"),
		@Column(name="pass_date", attrName="passDate", label="到期日期"),
		@Column(name="remarks", attrName="remarks", label="备注", queryType=QueryType.LIKE),
		@Column(name="parent_id", attrName="parentId.id", label="parent_id"),
	}, orderBy="a.id ASC"
)
public class StMaterialConvertBillDetail extends DataEntity<StMaterialConvertBillDetail> {
	
	private static final long serialVersionUID = 1L;
	private String materialCode;		// 物料名称
	private String batchNumber;		// 批号
	private String barCode;		// 条码号
	private Integer number;		// 数量
	private String outWarehouse;		// 调出仓位
	private String inWarehouse;		// 调入仓位
	private String convertMaterialCode;		// 转换后物料名称
	private String converrBarCode;		// 转换后条码号
	private String packType;		// 包装规格
	private Date productDate;		// 生产日期
	private Integer savedType;		// 保质期
	private Date passDate;		// 到期日期
	private StMaterialConvertBill parentId;		// parent_id 父类
	
	public StMaterialConvertBillDetail() {
		this(null);
	}


	public StMaterialConvertBillDetail(StMaterialConvertBill parentId){
		this.parentId = parentId;
	}
	
	@Length(min=0, max=20, message="物料名称长度不能超过 20 个字符")
	public String getMaterialCode() {
		return materialCode;
	}

	public void setMaterialCode(String materialCode) {
		this.materialCode = materialCode;
	}
	
	@Length(min=0, max=20, message="批号长度不能超过 20 个字符")
	public String getBatchNumber() {
		return batchNumber;
	}

	public void setBatchNumber(String batchNumber) {
		this.batchNumber = batchNumber;
	}
	
	@Length(min=0, max=30, message="条码号长度不能超过 30 个字符")
	public String getBarCode() {
		return barCode;
	}

	public void setBarCode(String barCode) {
		this.barCode = barCode;
	}
	
	public Integer getNumber() {
		return number;
	}

	public void setNumber(Integer number) {
		this.number = number;
	}
	
	@Length(min=0, max=36, message="调出仓位长度不能超过 36 个字符")
	public String getOutWarehouse() {
		return outWarehouse;
	}

	public void setOutWarehouse(String outWarehouse) {
		this.outWarehouse = outWarehouse;
	}
	
	@Length(min=0, max=36, message="调入仓位长度不能超过 36 个字符")
	public String getInWarehouse() {
		return inWarehouse;
	}

	public void setInWarehouse(String inWarehouse) {
		this.inWarehouse = inWarehouse;
	}
	
	@Length(min=0, max=20, message="转换后物料名称长度不能超过 20 个字符")
	public String getConvertMaterialCode() {
		return convertMaterialCode;
	}

	public void setConvertMaterialCode(String convertMaterialCode) {
		this.convertMaterialCode = convertMaterialCode;
	}
	
	@Length(min=0, max=30, message="转换后条码号长度不能超过 30 个字符")
	public String getConverrBarCode() {
		return converrBarCode;
	}

	public void setConverrBarCode(String converrBarCode) {
		this.converrBarCode = converrBarCode;
	}
	
	@Length(min=0, max=4, message="包装规格长度不能超过 4 个字符")
	public String getPackType() {
		return packType;
	}

	public void setPackType(String packType) {
		this.packType = packType;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getProductDate() {
		return productDate;
	}

	public void setProductDate(Date productDate) {
		this.productDate = productDate;
	}
	
	public Integer getSavedType() {
		return savedType;
	}

	public void setSavedType(Integer savedType) {
		this.savedType = savedType;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getPassDate() {
		return passDate;
	}

	public void setPassDate(Date passDate) {
		this.passDate = passDate;
	}
	
	@Length(min=0, max=36, message="parent_id长度不能超过 36 个字符")
	public StMaterialConvertBill getParentId() {
		return parentId;
	}

	public void setParentId(StMaterialConvertBill parentId) {
		this.parentId = parentId;
	}
	
}